
# import fnmatch
# import os
from AudioServer import AudioServer
import wx
from gui import PrefFrame
# import copy

### Excellent! 19/20

### Attention, melange de tabulations et d'espaces (verifier les prefs de vos editeurs!)

### Le nom des classes audio devrait peut-etre etre plus generique, sans simili-coquille comme Chorus(s).
### J'opterais pour un prefix propre au projet, comme AM_Chorus, AM_Harmonizer, etc.



# def importModules():
#   # print os.getcwd(), type(os.getcwd())
#   # print os.listdir(os.getcwd()+"/slotScripts")
#   finalDict = {}
#   for file in os.listdir(os.getcwd()+"/slotScripts"):
#       if fnmatch.fnmatch(file, '*.py'):
#           execfile(os.getcwd()+"/slotScripts/"+file, globals())
#           # print dir()
#           finalDict[name] = copy.deepcopy(modulesDict)
#           # print modulesDict, name
#           return finalDict

# print modulesDict
# app = wx.App(False)
# mainFrame1 = PrefFrame()
# mainFrame1.Show()
# app.MainLoop()

# mainFrame2 = wx.Frame(None, title='Simple App2')
# mainFrame2.Show()
# app.MainLoop()
# quit()

# open prefs file
# show with pref dialog
# save pref file
# open pref file in audioserver

app = wx.App(False)
mainFrame1 = PrefFrame()
mainFrame1.Show()
app.MainLoop()

# modulesDict = importModules()
# print dir()
s = AudioServer()


# import time
# from pyo import *
# from pref import prefs
# s = Server()
# # s.setVerbosity(15)
# s.boot()
# import OscServer

# def q():
#   s.stop()
#   time.sleep(1)
#   exit()